export function CountReducer(state = { count: 0 }, action) {
  switch (action.type) {
    case 'ADDNUM':
      // 要确保State始终是一个对象
      return { count: state.count + action.payload };
    case 'JIANNUM':
      return { count: state.count - action.payload };
    default:
      return state;
  }
}